<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pl" xml:lang="pl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Huu NC" />
<title>Quản lý thi trắc nghiệm | Trang quản trị</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/navi.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/ui.jqgrid.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/jquery.dataTables.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/jquery.fancybox.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>css/smoothness/jquery-ui-1.8.23.custom.css" media="screen" />
<script type="text/javascript" src="<?php echo base_url();?>js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/jquery.textbox-hinter.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/jquery.qtip-1.0.0-rc3.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/jquery-ui-1.8.23.custom.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/i18n/grid.locale-en.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>ckeditor/adapters/jquery.js"></script>
</head>
<body>
<div class="wrap">
  <div id="header">
    <div id="top">
      <div class="left">
        <p>Xin chào, <strong><?php echo $username . " (" .$full_name . ")"; ?></strong> [ <a href="<?php echo site_url('tdc/user/edit') ?>">Tài khoản</a> ] [ <a href="<?php echo site_url('tdc/logout') ?>">Đăng xuất</a> ]</p>
      </div>
      <div class="right">
        <div class="align-right">
          <p>Lần đăng nhập cuối: <strong><?php echo $last_login; ?></strong></p>
        </div>
      </div>
    </div>
    <div id="nav">
      <ul>
        <li class="upp"><a href="<?php echo site_url('tdc') ?>">Trang chủ</a> </li>
        <li class="upp"><a href="<?php echo site_url('tdc/question') ?>">Quản lý câu hỏi</a>
          <ul>
            <li>&#8250; <a href="<?php echo site_url('tdc/question/home') ?>">Xem ngân hàng câu hỏi</a></li>
            <li>&#8250; <a href="<?php echo site_url('tdc/question/addnew') ?>">Thêm câu hỏi mới</a></li>
          </ul>
        </li>
        <li class="upp"><a href="<?php echo site_url('tdc/test') ?>">Quản lý đề thi</a>
          <ul>
            <li>&#8250; <a href="<?php echo site_url('tdc/test/home') ?>">Xem ngân hàng đề thi</a></li>
            <li>&#8250; <a href="<?php echo site_url('tdc/test/addnew') ?>">Thêm đề thi mới</a></li>
          </ul>
        </li>
        <?php if ($is_admin == 1) { ?>
        <li class="upp"><a href="<?php echo site_url('tdc/user') ?>">Quản lý người dùng</a>
          <ul>
            <li>&#8250; <a href="<?php echo site_url('tdc/user/home') ?>">Xem danh sách</a></li>
            <li>&#8250; <a href="<?php echo site_url('tdc/user/addnew') ?>">Thêm người dùng mới</a></li>
          </ul>
        </li>
        <?php } ?>
        <li class="upp"><a href="<?php echo site_url('tdc/config') ?>">Cấu hình</a>
          <ul>
            <li>&#8250; <a href="<?php echo site_url('tdc/config/home') ?>">Cấu hình hệ thống</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
  <div id="content">
    <div id="sidebar">
      <div class="box">
        <div class="h_title">&#8250; Bảng điều khiển chung</div>
        <ul id="home">
          <li class="b1"><a class="icon view_page" href="">Trang chủ</a></li>
        </ul>
      </div>
      <div class="box">
        <div class="h_title">&#8250; Quản lý câu hỏi</div>
        <ul id="question">
          <li class="b1"><a class="icon page" href="<?php echo site_url('tdc/question/home') ?>">Xem ngân hàng câu hỏi</a></li>
          <li class="b2"><a class="icon add_page" href="<?php echo site_url('tdc/question/addnew') ?>">Thêm câu hỏi mới</a></li>
        </ul>
      </div>
      <div class="box">
        <div class="h_title">&#8250; Quản lý đề thi</div>
        <ul id="test">
          <li class="b1"><a class="icon page" href="<?php echo site_url('tdc/test/home') ?>">Xem ngân hàng đề thi</a></li>
          <li class="b2"><a class="icon add_page" href="<?php echo site_url('tdc/test/addnew') ?>">Thêm đề thi mới</a></li>
        </ul>
      </div>
      <?php
			if ($is_admin == 1) {
		?>
      <div class="box">
        <div class="h_title">&#8250; Quản lý người dùng</div>
        <ul id="user">
          <li class="b1"><a class="icon users" href="<?php echo site_url('tdc/user/home') ?>">Xem danh sách</a></li>
          <li class="b2"><a class="icon add_user" href="<?php echo site_url('tdc/user/addnew') ?>">Thêm người dùng mới</a></li>
        </ul>
      </div>
      <?php } ?>
      <div class="box">
        <div class="h_title">&#8250; Cấu hình</div>
        <ul id="config">
          <li class="b1"><a class="icon config" href="<?php echo site_url('tdc/config/home') ?>">Cấu hình hệ thống</a></li>
        </ul>
      </div>
    </div>
    <div id="main"> <?php echo $content; ?> </div>
    <div class="clear"></div>
  </div>
  <div id="footer">
    <div class="left">
      <p>Trang quản trị trắc nghiệm: <a href="http://localhost">http://localhost</a></p>
    </div>
    <div class="right">
      <p><a href="http://www.google.com.vn">Google</a> | <a href="http://facebook.com">Facebook</a></p>
    </div>
  </div>
</div>
<script type="text/javascript">
	$(function(){
		$(".box .h_title").not(this).next("ul").hide("normal");
		var url = window.location.href;
		var index = url.indexOf("tdc") + 4;
		var next_index = url.indexOf("/", index);
		var show_link = "#";
		if (next_index == -1)
			show_link += url.substring(index, url.length);
		else
			show_link += url.substring(index, url.indexOf("/", index));
		if (show_link == "#")
			show_link = "#home";
		$(".box .h_title").not(this).next(show_link).show("normal");
		$(".box").children(".h_title").click( function() { $(this).next("ul").slideToggle(); });
		
		$('div.n_error').each(function() {
			if ($(this).text() == "") {
				$(this).hide();
			} else {
				$(this).show().delay(10000).fadeOut();
			}
		});
		$('div.n_ok').each(function() {
			if ($(this).text() == "") {
				$(this).hide();
			} else {
				$(this).show().delay(10000).fadeOut();
			}
		});
	});
</script>
</body>
</html>